//
// Copyright (c) 2024 BPer
//
#ifndef INCLUDE_BPERUTIL_BPERUNISTD_H_
#define INCLUDE_BPERUTIL_BPERUNISTD_H_

#ifdef _MSC_VER
#include <Windows.h>
#define bPer_usleep(x) Sleep(x>1000?x/1000:1)
//void bPer_usleep(int ns){
 //       Sleep(ns>1000?ns/1000:1);
//}
#define bPer_sleep(x) Sleep(1000*x)
#else


#include <unistd.h>
#define bPer_usleep usleep
#define bPer_sleep sleep
#endif

#endif /* INCLUDE_BPERUTIL_BPERUNISTD_H_ */
